package com.pbc.gmp.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.pbc.gmp.commons.utils.PageInfo;
import com.pbc.gmp.dao.InspectiondetailMapper;
import com.pbc.gmp.model.basemodel.Insfrom;
import com.pbc.gmp.dao.InsfromMapper;
import com.pbc.gmp.model.mybatisDto.InspectionDetailInfo;
import com.pbc.gmp.model.mybatisDto.insfrominfo;
import com.pbc.gmp.service.IInsfromService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *   服务实现类
 * </p>
 *
 * @author kjk
 * @since 2018-06-14
 */
@Service
public class InsfromServiceImpl extends ServiceImpl<InsfromMapper, Insfrom> implements IInsfromService {

    @Resource(name="infromdao")
    private InsfromMapper insfromMapper;
    @Resource(name="indsDao")
    private InspectiondetailMapper indsMapper;
    @Override
    public void selectinsfromByDetailWhere(PageInfo pageInfo) {
        Page<Map<String, Object>> page = new Page<Map<String, Object>>(pageInfo.getNowpage(), pageInfo.getSize());
        List<insfrominfo> list = insfromMapper.selectinfromByDetailWhere(page, pageInfo.getCondition());
        pageInfo.setRows(list);
        pageInfo.setTotal(page.getTotal());
    }
}
